<template>
欢迎来到首页
</template>

<script setup>
const test = () => {
  new Promise(resolve => {
    setTimeout(() => {
      console.log('test')
    }, 2000)
    resolve()
  })
}
const test2 = () => {
  return new Promise(resolve => {
    console.log("test2")
    resolve('good')
  })
}
const getList = async () => {
  await test()
  const a = await test2()
  console.log(a)
  // a.then(res => {
  //   console.log(res + "123")
  // })
}
getList()

</script>

<style scoped>

</style>